package com.yfyszk.kingbird.feign;


import com.yfyszk.kingbird.common.result.ApiResult;
import com.yfyszk.kingbird.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**这里的方法是和控制器一一对应的否则报错
 * @author wgc
 *@date 2021/2/26 0026 10:34
 * @return
 */
@FeignClient(path = "/order",name="ysyfzk-test",fallbackFactory =OrderServiceFallbackFactory.class)
public interface OrderFeignClient {

    @RequestMapping("/getOrder")
    public String getOrder(@RequestParam("orderId") String orderId);

    //用户查询订单
    @RequestMapping("/findeOrderByUserId")
    public R findeOrderByUserId(@RequestParam("userId") String userId);


    //用户查询订单
    @RequestMapping("/findeOrderByUserIdTest")
    public ApiResult findeOrderByUserIdTest(@RequestParam("userId") String userId);
    //如果是传递对象 使用@RequestBody 双方都要加
}
